package com.ljx.itbbs.server.article.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ljx.itbbs.server.article.domain.entity.ArticleTagRelationEntity;
import com.ljx.itbbs.server.article.mapper.ArticleTagRelationMapper;
import org.springframework.stereotype.Service;

@Service
public class ArticleTagRelationDao extends ServiceImpl<ArticleTagRelationMapper, ArticleTagRelationEntity> {

    public void deleteArticleTagRelation(Long articleId) {
        this.baseMapper.delete(
                new LambdaQueryWrapper<ArticleTagRelationEntity>().eq(ArticleTagRelationEntity::getArticleId, articleId)
        );
    }
}
